package com.qf.logistics.controller;

import com.qf.logistics.dto.R;
import com.qf.logistics.pojo.MemberCar;
import com.qf.logistics.service.MemberCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * created by 赵文韬 on 2022/4/4 18:30
 */
@RestController
@RequestMapping("/car")
public class MemberCarController {
    private MemberCarService memberCarService;
    @Autowired
    public void setMemberCarService(MemberCarService memberCarService) {
        this.memberCarService = memberCarService;
    }
    @PostMapping("/findByMenberId/{id}")
    public R findByMemberId(Long id){
        List<MemberCar> byMenberId = memberCarService.findByMenberId(id);
        return R.getR(1,"查询成功" ,byMenberId );
    }

}
